LEADTOOLS Medical (Leadtools.Dicom assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
GetBinaryValue(DicomElement,Byte[],Int32,Int32) Method
See Also 
Leadtools.Dicom Namespace > DicomDataSet Class > GetBinaryValue Method : GetBinaryValue(DicomElement,Byte[],Int32,Int32) Method



element
An item in the Data Set.
value
Buffer that will be updated with the binary value associated with the specified item in the Data Set. You are responsible for allocating the memory for this buffer.
offset
Offset from the beginning of the buffer, at which writing will start.
length
Number of bytes, from the binary value, to write to the buffer.
element
An item in the Data Set.
value
Buffer that will be updated with the binary value associated with the specified item in the Data Set. You are responsible for allocating the memory for this buffer.
offset
Offset from the beginning of the buffer, at which writing will start.
length
Number of bytes, from the binary value, to write to the buffer.
Updates a buffer with the binary value of the specified data element. Supported in Silverlight, Windows Phone 7.

Syntax

Visual Basic (Declaration) 
Overloads Public Function GetBinaryValue( _
   ByVal element As DicomElement, _
   ByVal value() As Byte, _
   ByVal offset As Integer, _
   ByVal length As Integer _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As DicomDataSet
Dim element As DicomElement
Dim value() As Byte
Dim offset As Integer
Dim length As Integer
Dim value As Boolean
 
value = instance.GetBinaryValue(element, value, offset, length)
C# 
public bool GetBinaryValue( 
   DicomElement element,
   byte[] value,
   int offset,
   int length
)
C++/CLI 
public:
bool GetBinaryValue( 
   DicomElement^ element,
   array<byte>^ value,
   int offset,
   int length
) 

Parameters

element
An item in the Data Set.
value
Buffer that will be updated with the binary value associated with the specified item in the Data Set. You are responsible for allocating the memory for this buffer.
offset
Offset from the beginning of the buffer, at which writing will start.
length
Number of bytes, from the binary value, to write to the buffer.

Return Value

true if the method was able to update the buffer with the binary value; otherwise, false.

Example

For an example, refer to DicomDataSet.SetIntValue.

Remarks

Note: You must allocate the memory for value.

If the length specified by the DicomElement.Length property is greater than length, then the binary value copied to the buffer will be truncated to the smaller length. If the the length specified by DicomElement.Length is less than length, then the entire binary value of element will be copied to the buffer.

This method can be called for every Value Representation, and it will return the exact value in the Value Field (unconverted).

Requirements

Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also

Leadtools.Dicom requires a Medical toolkit server license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features